<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>v1.1.2 不兼容更新 | BuildAdmin</title>
    <meta name="generator" content="VuePress 1.9.7">
    <link rel="icon" href="/images/favicon.ico">
    <meta name="description" content="使用流行技术栈快速创建商业级后台管理系统-BuildAdmin是基于TP6、Vue3.x、Typescript、Vite、Pinia、Element plus等的开源后台系统">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="keywords" content="BuildAdmin,ThinkPHP6通用后台,Vue3后台,BuildAdmin文档,vue3开源后台,vue3模板与案例市场">
    <meta name="author" content="妙码生花">
    <meta name="robots" content="all,follow">
    
    <link rel="preload" href="/assets/css/0.styles.76db4400.css" as="style"><link rel="preload" href="/assets/js/app.26dfc26f.js" as="script"><link rel="preload" href="/assets/js/2.845fc4bd.js" as="script"><link rel="preload" href="/assets/js/40.24ae817d.js" as="script"><link rel="prefetch" href="/assets/js/10.31502a42.js"><link rel="prefetch" href="/assets/js/11.c0667200.js"><link rel="prefetch" href="/assets/js/12.0022daab.js"><link rel="prefetch" href="/assets/js/13.496b9007.js"><link rel="prefetch" href="/assets/js/14.57a77bc0.js"><link rel="prefetch" href="/assets/js/15.a2ee4fc7.js"><link rel="prefetch" href="/assets/js/16.7050523a.js"><link rel="prefetch" href="/assets/js/17.c4c5529f.js"><link rel="prefetch" href="/assets/js/18.f0350247.js"><link rel="prefetch" href="/assets/js/19.60586b14.js"><link rel="prefetch" href="/assets/js/20.4c6361b4.js"><link rel="prefetch" href="/assets/js/21.f793d386.js"><link rel="prefetch" href="/assets/js/22.299fa3b0.js"><link rel="prefetch" href="/assets/js/23.460af9b1.js"><link rel="prefetch" href="/assets/js/24.67771dfc.js"><link rel="prefetch" href="/assets/js/25.57b0bfa7.js"><link rel="prefetch" href="/assets/js/26.30e9faee.js"><link rel="prefetch" href="/assets/js/27.15ffda62.js"><link rel="prefetch" href="/assets/js/28.4ca46604.js"><link rel="prefetch" href="/assets/js/29.09a58cb6.js"><link rel="prefetch" href="/assets/js/3.959fd4f8.js"><link rel="prefetch" href="/assets/js/30.c53f15cb.js"><link rel="prefetch" href="/assets/js/31.0d30028e.js"><link rel="prefetch" href="/assets/js/32.4591b41b.js"><link rel="prefetch" href="/assets/js/33.bd9ed146.js"><link rel="prefetch" href="/assets/js/34.0bedaafb.js"><link rel="prefetch" href="/assets/js/35.dded2c4a.js"><link rel="prefetch" href="/assets/js/36.3f14f7ef.js"><link rel="prefetch" href="/assets/js/37.348ab3dc.js"><link rel="prefetch" href="/assets/js/38.bea67b35.js"><link rel="prefetch" href="/assets/js/39.66735bad.js"><link rel="prefetch" href="/assets/js/4.a7dad9f3.js"><link rel="prefetch" href="/assets/js/41.20484420.js"><link rel="prefetch" href="/assets/js/42.d2d9cf07.js"><link rel="prefetch" href="/assets/js/43.638926f9.js"><link rel="prefetch" href="/assets/js/44.5b2e8865.js"><link rel="prefetch" href="/assets/js/45.b08599e3.js"><link rel="prefetch" href="/assets/js/46.3e165b3e.js"><link rel="prefetch" href="/assets/js/47.0f981d94.js"><link rel="prefetch" href="/assets/js/48.52c21e5e.js"><link rel="prefetch" href="/assets/js/49.5d5d4c94.js"><link rel="prefetch" href="/assets/js/5.2d6b30a8.js"><link rel="prefetch" href="/assets/js/50.379ba4f0.js"><link rel="prefetch" href="/assets/js/51.4f4ecaea.js"><link rel="prefetch" href="/assets/js/52.81ccb047.js"><link rel="prefetch" href="/assets/js/53.419686cb.js"><link rel="prefetch" href="/assets/js/54.783cb319.js"><link rel="prefetch" href="/assets/js/55.110fde12.js"><link rel="prefetch" href="/assets/js/56.53900e45.js"><link rel="prefetch" href="/assets/js/57.55cd3551.js"><link rel="prefetch" href="/assets/js/58.2b82c178.js"><link rel="prefetch" href="/assets/js/59.fec4fe12.js"><link rel="prefetch" href="/assets/js/6.4e9a5a2e.js"><link rel="prefetch" href="/assets/js/60.99354f6f.js"><link rel="prefetch" href="/assets/js/61.c528c138.js"><link rel="prefetch" href="/assets/js/62.831c810e.js"><link rel="prefetch" href="/assets/js/63.9923d5c6.js"><link rel="prefetch" href="/assets/js/64.01b9c0fd.js"><link rel="prefetch" href="/assets/js/65.1288d968.js"><link rel="prefetch" href="/assets/js/66.f7c8aabd.js"><link rel="prefetch" href="/assets/js/67.89455afa.js"><link rel="prefetch" href="/assets/js/68.ca185a9e.js"><link rel="prefetch" href="/assets/js/69.dfe2288f.js"><link rel="prefetch" href="/assets/js/7.58476ce6.js"><link rel="prefetch" href="/assets/js/70.ea823c37.js"><link rel="prefetch" href="/assets/js/71.9e222b70.js"><link rel="prefetch" href="/assets/js/72.77b15e17.js"><link rel="prefetch" href="/assets/js/73.f42962da.js"><link rel="prefetch" href="/assets/js/74.a2912f27.js"><link rel="prefetch" href="/assets/js/75.8db3af79.js"><link rel="prefetch" href="/assets/js/76.45426b7e.js"><link rel="prefetch" href="/assets/js/77.a5d8ef7a.js"><link rel="prefetch" href="/assets/js/78.cfcdd83a.js"><link rel="prefetch" href="/assets/js/79.d8b5e327.js"><link rel="prefetch" href="/assets/js/8.419e773f.js"><link rel="prefetch" href="/assets/js/80.a64f0503.js"><link rel="prefetch" href="/assets/js/9.633ba216.js">
    <link rel="stylesheet" href="/assets/css/0.styles.76db4400.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container max-content"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/images/logo.png" alt="BuildAdmin" class="logo"> <span class="site-name can-hide">BuildAdmin</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/guide/" class="nav-link router-link-active">
  指南
</a></div><div class="nav-item"><a href="/senior/" class="nav-link">
  进阶
</a></div><div class="nav-item"><a href="https://buildadmin.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  官网
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><a href="https://demo.buildadmin.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  线上演示
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="代码仓库" class="dropdown-title"><span class="title">代码仓库</span> <span class="arrow down"></span></button> <button type="button" aria-label="代码仓库" class="mobile-dropdown-title"><span class="title">代码仓库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://gitee.com/wonderful-code/buildadmin" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Gitee
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://github.com/build-admin/buildadmin" target="_blank" rel="noopener noreferrer" class="nav-link external">
  GitHub
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div><div class="nav-item"><a href="/fastadmin.html" class="nav-link">
  🎉FastAdmin
</a></div><div class="nav-item"><a href="https://gitee.com/wonderful-code/buildadmin/blob/master/CHANGELOG.md" target="_blank" rel="noopener noreferrer" class="nav-link external">
  更新日志
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <a href="https://gitee.com/wonderful-code/build-admin-doc" target="_blank" rel="noopener noreferrer" class="repo-link">
    文档仓库
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/guide/" class="nav-link router-link-active">
  指南
</a></div><div class="nav-item"><a href="/senior/" class="nav-link">
  进阶
</a></div><div class="nav-item"><a href="https://buildadmin.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  官网
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><a href="https://demo.buildadmin.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  线上演示
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="代码仓库" class="dropdown-title"><span class="title">代码仓库</span> <span class="arrow down"></span></button> <button type="button" aria-label="代码仓库" class="mobile-dropdown-title"><span class="title">代码仓库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://gitee.com/wonderful-code/buildadmin" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Gitee
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://github.com/build-admin/buildadmin" target="_blank" rel="noopener noreferrer" class="nav-link external">
  GitHub
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div><div class="nav-item"><a href="/fastadmin.html" class="nav-link">
  🎉FastAdmin
</a></div><div class="nav-item"><a href="https://gitee.com/wonderful-code/buildadmin/blob/master/CHANGELOG.md" target="_blank" rel="noopener noreferrer" class="nav-link external">
  更新日志
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <a href="https://gitee.com/wonderful-code/build-admin-doc" target="_blank" rel="noopener noreferrer" class="repo-link">
    文档仓库
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>入门须知</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/guide/" aria-current="page" class="sidebar-link">介绍</a></li><li><a href="/guide/permit.html" class="sidebar-link">许可</a></li><li><a href="/guide/learnDoc.html" class="sidebar-link">学习文档</a></li><li><a href="/guide/specialThanks.html" class="sidebar-link">特别鸣谢</a></li><li><a href="/guide/technologySelection.html" class="sidebar-link">技术选型答疑</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>安装</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/guide/install/start.html" class="sidebar-link">快速上手</a></li><li><a href="/guide/install/senior.html" class="sidebar-link">安装服务进阶</a></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading"><span>安装附录</span> <span class="arrow right"></span></p> <!----></section></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>其他</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/guide/other/developerMustSee.html" class="sidebar-link">开发者必看</a></li><li><a href="/guide/other/contributionCode.html" class="sidebar-link">贡献代码</a></li><li><a href="/guide/other/gitCommitSpecification.html" class="sidebar-link">git 提交规范</a></li><li><a href="/guide/other/update.html" class="sidebar-link">框架更新指南</a></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading"><span>附录</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable is-sub-group depth-1"><p class="sidebar-heading open"><span>不兼容更新</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/guide/other/incompatibleUpdate/v106.html" class="sidebar-link">v1.0.6</a></li><li><a href="/guide/other/incompatibleUpdate/v112.html" aria-current="page" class="active sidebar-link">v1.1.2</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/guide/other/incompatibleUpdate/v112.html#本次更新带来性能的优势" class="sidebar-link">本次更新带来性能的优势</a></li><li class="sidebar-sub-header"><a href="/guide/other/incompatibleUpdate/v112.html#语言包不兼容" class="sidebar-link">语言包不兼容</a></li><li class="sidebar-sub-header"><a href="/guide/other/incompatibleUpdate/v112.html#文件重命名" class="sidebar-link">文件重命名</a></li></ul></li></ul></section></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="v1-1-2-不兼容更新"><a href="#v1-1-2-不兼容更新" class="header-anchor">#</a> v1.1.2 不兼容更新</h1> <h2 id="本次更新带来性能的优势"><a href="#本次更新带来性能的优势" class="header-anchor">#</a> 本次更新带来性能的优势</h2> <h4 id="生产环境"><a href="#生产环境" class="header-anchor">#</a> 生产环境</h4> <table><thead><tr><th style="text-align:center;">项目</th> <th style="text-align:center;"><code>小于等于 v1.1.1 版本</code></th> <th style="text-align:center;"><code>v1.1.2</code></th></tr></thead> <tbody><tr><td style="text-align:center;">首页</td> <td style="text-align:center;">4.4MB</td> <td style="text-align:center;"><strong>1.8MB</strong></td></tr> <tr><td style="text-align:center;">控制台</td> <td style="text-align:center;">4.5MB</td> <td style="text-align:center;"><strong>3.1MB</strong></td></tr> <tr><td style="text-align:center;">会员中心</td> <td style="text-align:center;">4.3MB</td> <td style="text-align:center;"><strong>2.9MB</strong></td></tr></tbody></table> <p>注：<code>vue</code>占<code>1.1MB</code>，<code>echarts</code>占<code>1.0MB</code>（未压缩）</p> <h4 id="开发环境"><a href="#开发环境" class="header-anchor">#</a> 开发环境</h4> <table><thead><tr><th style="text-align:center;">项目</th> <th style="text-align:center;"><code>小于等于 v1.1.1 版本</code></th> <th style="text-align:center;"><code>v1.1.2</code></th></tr></thead> <tbody><tr><td style="text-align:center;">首页</td> <td style="text-align:center;">11.5MB</td> <td style="text-align:center;"><strong>4.5MB</strong></td></tr> <tr><td style="text-align:center;">控制台</td> <td style="text-align:center;">11.2MB</td> <td style="text-align:center;"><strong>8.0MB</strong></td></tr> <tr><td style="text-align:center;">会员中心</td> <td style="text-align:center;">11.2MB</td> <td style="text-align:center;"><strong>7.1MB</strong></td></tr></tbody></table> <h2 id="语言包不兼容"><a href="#语言包不兼容" class="header-anchor">#</a> 语言包不兼容</h2> <p>新版本的语言包将根据当前路由的 <code>path</code>和<code>name</code> <strong>自动按需载入</strong>，有以下注意事项：</p> <h4 id="按需加载后-就不能随心使用任意语言包了-请确保页面使用的语言翻译已经被加载"><a href="#按需加载后-就不能随心使用任意语言包了-请确保页面使用的语言翻译已经被加载" class="header-anchor">#</a> 按需加载后，就不能随心使用任意语言包了，请确保页面使用的语言翻译已经被加载</h4> <p>比如当前语言为<code>zh-cn</code>，用户访问<code>path</code>为<code>/admin/user/user</code>的页面，视图组件为<code>/@/views/backend/user/user/index.vue</code>，在视图组件及其子组件内</p> <div class="language-ts extra-class"><pre class="language-ts"><code><span class="token comment">// 全局语言包可用(/@/lang/globs-zh-cn.ts)</span>
<span class="token function">t</span><span class="token punctuation">(</span><span class="token string">&quot;state&quot;</span><span class="token punctuation">)</span>

<span class="token comment">// 后台公共语言包可用(/@/lang/backend/zh-cn.ts)</span>
<span class="token function">t</span><span class="token punctuation">(</span><span class="token string">&quot;layouts.default&quot;</span><span class="token punctuation">)</span>

<span class="token comment">// 按需加载的语言包可用(/@/lang/backend/zh-cn/user/user.ts)</span>
<span class="token function">t</span><span class="token punctuation">(</span><span class="token string">&quot;user.user.nickname&quot;</span><span class="token punctuation">)</span>

<span class="token comment">// 其他语言包都不可以使用</span>
<span class="token function">t</span><span class="token punctuation">(</span><span class="token string">&quot;user.group.jurisdiction&quot;</span><span class="token punctuation">)</span>
</code></pre></div><p>若您可能混乱的使用了语言翻译，建议您在更新完成后，打开可能涉及的页面查看浏览器开发者工具的控制台是否有语言翻译<code>key</code>找不到的警告。</p> <h4 id="废弃-lang-pages目录"><a href="#废弃-lang-pages目录" class="header-anchor">#</a> 废弃<code>/@/lang/pages</code>目录</h4> <p>在您执行<code>git pull</code>后，可能看见类似这样的冲突<code>CONFLICT (file location): web/src/lang/pages/en/testBuild.ts added in HEAD inside a directory that was renamed in 43bf5, suggesting it should perhaps be moved to web/src/lang/backend/en/testBuild.ts.</code></p> <p>以上信息中，<code>git</code>建议您将文件从<code>/@/lang/pages</code>移动到<code>/@/lang/backend</code>，但通常情况下，冲突文件已经自动移动好，只需手动<code>add、commit</code>即可，移动后的文件即可<strong>自动按需加载</strong>；同时，在一些版本管理软件中，可能提示以上冲突的<code>/@/lang/pages</code>文件找不到了，这是正常的，您只需确定在<code>/@/lang/backend</code>中存在该文件即可。</p> <h5 id="控制台警告"><a href="#控制台警告" class="header-anchor">#</a> 控制台警告</h5> <p>更新后，您的浏览器控制台内可能出现警告消息：<code>从 BuildAdmin v1.1.2 版本开始，已经可以实现语言包的按需加载...</code>，请参考下表对文件进行移动以实现<strong>语言包按需加载</strong>。</p> <blockquote><p>快速理解，例如：后台页面<code>/admin/testBuild</code>的语言包位于<code>/@/lang/pages/zh-cn/testBuild</code>移动至<code>/@/lang/backend/zh-cn/testBuild</code>即可，<code>pages</code>变成了<code>backend</code></p></blockquote> <table><thead><tr><th style="text-align:center;">目录/文件</th> <th style="text-align:center;">说明</th></tr></thead> <tbody><tr><td style="text-align:center;"><code>/@/lang/backend</code></td> <td style="text-align:center;">存放后台语言包文件</td></tr> <tr><td style="text-align:center;"><code>/@/lang/frontend</code></td> <td style="text-align:center;">存放前台语言包文件</td></tr> <tr><td style="text-align:center;"><code>/@/lang/common</code></td> <td style="text-align:center;">存放公共语言包文件</td></tr> <tr><td style="text-align:center;"><code>/@/lang/backend/globs-zh-cn.ts</code></td> <td style="text-align:center;">全局公共语言翻译（中文）</td></tr> <tr><td style="text-align:center;"><code>/@/lang/backend/globs-en.ts</code></td> <td style="text-align:center;">全局公共语言翻译（英文）</td></tr> <tr><td style="text-align:center;"><code>/@/lang/backend/zh-cn.ts</code></td> <td style="text-align:center;">后台公共语言翻译（中文）</td></tr> <tr><td style="text-align:center;"><code>/@/lang/backend/en.ts</code></td> <td style="text-align:center;">后台公共语言翻译（英文）</td></tr> <tr><td style="text-align:center;"><code>/@/lang/frontend/zh-cn.ts</code></td> <td style="text-align:center;">前台公共语言翻译（中文）</td></tr> <tr><td style="text-align:center;"><code>/@/lang/frontend/en.ts</code></td> <td style="text-align:center;">前台公共语言翻译（英文）</td></tr></tbody></table> <p>通常情况下，直接将目录整个移动到对应位置，以下给出一些例子，主要需要保证的是：系统通过路由的<code>path</code>和<code>name</code>能够按需的加载到对应的语言包文件</p> <table><thead><tr><th style="text-align:center;">目录/文件</th> <th style="text-align:center;">路由<code>path</code></th> <th style="text-align:center;">移动至</th> <th style="text-align:center;">备注</th></tr></thead> <tbody><tr><td style="text-align:center;"><code>/@/lang/pages/zh-cn/sms/目录</code></td> <td style="text-align:center;"><code>/admin/sms/*</code></td> <td style="text-align:center;"><code>/@/lang/backend/zh-cn/sms/目录</code></td> <td style="text-align:center;">放入后台目录即可</td></tr> <tr><td style="text-align:center;"><code>/@/lang/pages/en/sms/目录</code></td> <td style="text-align:center;"><code>/admin/sms/*</code></td> <td style="text-align:center;"><code>/@/lang/backend/en/sms/目录</code></td> <td style="text-align:center;"></td></tr> <tr><td style="text-align:center;"><code>/@/lang/pages/zh-cn/404.ts</code></td> <td style="text-align:center;">404页面语言包</td> <td style="text-align:center;"><code>/@/lang/common/zh-cn/404.ts</code></td> <td style="text-align:center;">放入公共目录全局加载</td></tr> <tr><td style="text-align:center;"><code>/@/lang/pages/zh-cn/terminal.ts</code></td> <td style="text-align:center;">终端的语言包，无单独路由</td> <td style="text-align:center;"><code>/@/lang/backend/zh-cn.ts</code></td> <td style="text-align:center;">放入后台公共语言包</td></tr></tbody></table> <p><strong>作为最后的解决方案</strong>，您可以将所有难以调整的语言包放入<code>/@/lang/common</code>文件夹，它的功能与原<code>pages</code>一致，会被全局加载，前后台任意页面均可使用。</p> <h2 id="文件重命名"><a href="#文件重命名" class="header-anchor">#</a> 文件重命名</h2> <blockquote><p>文件重命名的操作通常由<code>git</code>自动完成，无需您关注，此处仅提醒（有冲突的情况除外）。</p></blockquote> <p>我们新建了<code>mixins</code>组件，并将所有的<code>mixins</code>代码放入其中，以对混入代码进行统一管理；PS：混入代码最典型的例子是：您安装云存储模块时，会被自动覆盖的<code>/src/components/baInput/components\baUpload.ts</code>文件。</p> <div class="language-ini extra-class"><pre class="language-ini"><code><span class="token key attr-name">rename web/src/components/{baInput/components</span> <span class="token punctuation">=</span><span class="token value attr-value">&gt; mixins}/baUpload.ts</span>
<span class="token key attr-name">rename web/src/{layouts/common</span> <span class="token punctuation">=</span><span class="token value attr-value">&gt; components}/mixins/loginFooter.vue</span>
<span class="token key attr-name">rename web/src/{layouts/common</span> <span class="token punctuation">=</span><span class="token value attr-value">&gt; components}/mixins/loginMounted.ts</span>
<span class="token key attr-name">rename web/src/{layouts/common</span> <span class="token punctuation">=</span><span class="token value attr-value">&gt; components}/mixins/userMounted.ts</span>
<span class="token key attr-name">rename web/src/{layouts/common</span> <span class="token punctuation">=</span><span class="token value attr-value">&gt; components}/mixins/userProfile.vue</span>
</code></pre></div></div> <footer class="page-edit"><div class="edit-link"><a href="https://gitee.com/wonderful-code/build-admin-doc/edit/master/docs/guide/other/incompatibleUpdate/v112.md" target="_blank" rel="noopener noreferrer">点此帮助我们改善此页面</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">2023/1/9 21:28:32</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/guide/other/incompatibleUpdate/v106.html" class="prev">
        v1.0.6
      </a></span> <!----></p></div> </main></div><div class="global-ui"></div></div>
    <script src="/assets/js/app.26dfc26f.js" defer></script><script src="/assets/js/2.845fc4bd.js" defer></script><script src="/assets/js/40.24ae817d.js" defer></script>
  </body>
</html>
